#!/bin/bash

pwd

total_line=0
for file_name in $(ls)
do
    [ ! -f "$file_name" ] && continue
    lines=$(cat "$file_name" | wc -l)
    printf "%32s total lines:%4d\n" "$file_name" $lines
    let total_line+=lines
done

echo "all files total lines: $total_line"
